.TH E1432_SET_TTLTRG_CLOCK 3 E1432
.SH NAME
.nf
e1432_set_ttltrg_clock \- Select a TTLTRG line for freerun clock
e1432_get_ttltrg_clock \- Get current TTLTRG line for freerun clock
.fi
.IX e1432_set_ttltrg_clock(3) 3
.IX e1432_get_ttltrg_clock(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_ttltrg_clock(E1432ID hw, SHORTSIZ16 ID,
                                  SHORTSIZ16 ttltrg)
SHORTSIZ16 e1432_get_ttltrg_clock(E1432ID hw, SHORTSIZ16 ID,
                                  SHORTSIZ16 *ttltrg)
.cE
.SH DESCRIPTION

\fIe1432_set_ttltrg_clock\fR sets the VXI TTLTRG line used for the
freerunning clock.  If a measurement is in progress while calling this
function, the measurement is aborted.  The freerunning clock can be
shared by several E1432 modules, to ensure that they sample data at
the same time.

\fIe1432_get_ttltrg_clock\fR returns the currently selected VXI TTLTRG
line for the freerunning clock in the memory location pointed to by
\fIttltrg\fR.

An alternative way to specify TTLTRG line for the freerunning clock is
to use the \fIe1432_set_ttltrg_lines\fR function.  That function
restricts the choice of TTLTRG line to those compatible with the E1431
8-Channel VXI Input.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIttltrg\fR selects a VXI ttltrg line to be used for the
freerunning sample clock.

\fBE1432_TTLTRG_0\fR selects TTLTRG0 for the clock.
\fBE1432_TTLTRG_1\fR selects TTLTRG1 for the clock.
\fBE1432_TTLTRG_2\fR selects TTLTRG2 for the clock.
\fBE1432_TTLTRG_3\fR selects TTLTRG3 for the clock.
\fBE1432_TTLTRG_4\fR selects TTLTRG4 for the clock.
\fBE1432_TTLTRG_5\fR selects TTLTRG5 for the clock.
\fBE1432_TTLTRG_6\fR selects TTLTRG6 for the clock.
\fBE1432_TTLTRG_7\fR selects TTLTRG7 for the clock.

The mere selection of the TTLTRG line by this function does not
necessarily cause the clock to get driven onto that TTLTRG line.
Normally, the clock is driven onto the TTLTRG line only when running a
multi-module measurement.  This is taken care of automatically during
\fIe1432_init_measure\fR if \fIe1432_set_auto_group_meas\fR is on.

When \fIe1432_set_auto_group_meas\fR is off, the TTLTRG line is driven
only if one of the following conditions is met:

1. \fIe1432_set_clock_master\fR is \fBE1432_MASTER_CLOCK_ON\fR.

2. \fIe1432_set_multi_sync\fR is \fBE1432_SYSTEM_SYNC_ON\fR.

3. \fIe1432_set_clock_source\fR is \fBE1432_CLOCK_SOURCE_VXI\fR or
\fBE1432_CLOCK_VXI_DEC_3\fR.

.SH "RESET VALUE"
After a reset, \fIttltrg\fR is set to \fBE1432_TTLTRG_1\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_ttltrg_gclock, e1432_set_ttltrg_satrg,
e1432_set_ttltrg_trigger, e1432_set_ttltrg_lines
.ad
